function setIframeSrc(retryCount) {
    if(typeof retryCount === 'undefined') retryCount = 0;
    var pipe = document.getElementById("helpFrame");
    var height = getHeight();
    if(height == 0 && retryCount < retryMaxCount){
        retryCount++;
        setTimeout("setIframeSrc(" + retryCount + ")", retryWaitTime);
        return;
    }
    var iframeId = getIframeId();
    var url = domain + pathName + "?height=" + height + "&iframeid=" + iframeId + "&cacheb=" + Math.random() + "&bsh=" + document.body.scrollHeight + "&bch=" + document.body.clientHeight + "&esh=" + document.documentElement.scrollHeight + "&ech=" + document.documentElement.clientHeight + "&rc=" + retryCount;
    pipe.src = url;
}
function getHeight() {
    if(typeof customHeight!= "undefined"){
        if(String(customHeight).match(/^[0-9]+$/)){
            return customHeight;
        } else{
            if(document.body.scrollHeight > 0 && document.documentElement.scrollHeight > 0) {
                return Math.max.apply(null, [
                    document.body.scrollHeight,
                    document.documentElement.scrollHeight
                ]);
            }
        }
    } else{
        if(document.body.scrollHeight > 0 && document.documentElement.scrollHeight > 0) {
            return Math.max.apply(null, [
                    document.body.scrollHeight,
                    document.documentElement.scrollHeight
            ]);
        }
    }
    return 0;
}
function getIframeId(){
    if(typeof customIframeId != "undefined"){
        return customIframeId;
    } else{
        return "";
    }
}
function tLayerMainService(urlpath){
    top.location.href = domain + tLayerPathMainService + urlpath;
}
